package com.chem.lems.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

@Data
@Entity
@Table(name = "elms_equip")

public class Equipment {

    @Id
    @Column(name = "equip_id", length = 50)
    @GenericGenerator(name = "jpa-uuid", strategy = "uuid")
    @GeneratedValue(generator = "jpa-uuid")
    @ExcelProperty("设备ID")
    @ColumnWidth(35)
    private String equipId;

    //设备名称
    @ExcelProperty("设备名称")
    @Column(name = "equip_name")
    @ColumnWidth(20)
    private String equipName;

    //设备描述
    @ExcelProperty("设备描述")
    @Column(name = "equip_desc")
    @ColumnWidth(35)
    private String equipDesc;

    //设备状态
    @ExcelProperty("设备状态")
    @Column(name = "equip_state")
    @ColumnWidth(12)
    private Integer equipState;

    //厂商
    @ExcelProperty("设备厂商")
    @Column(name = "equip_firm")
    @ColumnWidth(20)
    private String equipFirm;

    //采购员
    @ExcelProperty("采购员")
    @Column(name = "equip_buyer")
    @ColumnWidth(9)
    private String equipBuyer;

    //商品价格
    @ExcelProperty("商品价格")
    @Column(name = "equip_price")
    @ColumnWidth(12)
    private Integer equipPrice;

    /**
     * 入库时间
     */
    @ExcelProperty("入库时间")
    @CreatedDate
    @Column(name = "create_time", length = 50, updatable = false, nullable = false)
    @ColumnWidth(18)
    private Date createTime;

}
